#ifndef __USER_BT_COMMON_H
#define __USER_BT_COMMON_H

#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <stdbool.h>
//#include "driver_codec.h"
#include "app_at.h"
#include "user_bt.h"

#define USER_BT_VOLUM_MAX       (0x1000)
#define USER_BT_HF_VOLUME_MAX   (0x2000)
#define USER_BT_NAME         "freq_bt"
typedef struct 
{
    uint8_t vol;
    uint8_t lev;
}user_bt_vol_t;

enum bt_volume_type_t{
    BT_VOL_HFP,                         //设置通话音量
    BT_VOL_MEDIA,                       //设置媒体音量
    BT_VOL_TONE,                        //设置提示音量
    BT_VOL_MAX,
};


extern void    user_bt_set_volume(uint8_t vol);
extern uint8_t    user_bt_volume_lev_convert(enum bt_volume_type_t type,uint8_t lev);

extern uint8_t *user_bt_get_local_name(void);
extern uint8_t *user_bt_get_mac(void);
extern char *user_ble_get_local_name(void);
extern uint8_t *user_ble_get_mac(void);

extern bool    user_bt_set_spk_volume(enum bt_volume_type_t type,uint16_t vol);
extern bool    user_bt_set_local_volume(enum bt_volume_type_t type,uint16_t vol);

extern void    user_bt_disconnect(void);
extern void    user_bt_off(void);
extern void    user_bt_on(void);

extern void    user_bt_set_module(bool sat);
extern bool    user_bt_get_module(void);

extern void    user_bt_profile_disable(uint8_t profile);
extern void    user_bt_profile_enable(uint8_t profile);
#endif  /*  __USER_BT_COMMON_H  */
